package action;

import infrastructure.IInfraction;

import java.util.ArrayList;
import java.util.List;

import mappers.InfractionMapper;

import com.opensymphony.xwork2.ActionSupport;

public class VisualiserInfractionAction extends ActionSupport {
	private static final long serialVersionUID = 1L;
	protected List<IInfraction> infractions = new ArrayList<IInfraction>();
	private InfractionMapper infractionDAO;
	
	public void setInfractionDAO(InfractionMapper infractionDAO) {
		this.infractionDAO = infractionDAO;
	}

	public List<IInfraction> getInfractions() {
		return infractions;
	}

	public void setInfractions(List<IInfraction> infractions) {
		this.infractions = infractions;
	}
	public String visualiserInfractions() {
		setInfractions(infractionDAO.getInfractions());
		return SUCCESS;
	}
	
}
